home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / lib / demo_mode.pro < prev    next >
Text File  |  1997-07-08  |  777b  |  40 lines

  1. ; $Id: demo_mode.pro,v 1.3 1997/01/15 03:11:50 ali Exp $
  2. ;
  3. ; Copyright (c) 1991-1997, Research Systems, Inc.  All rights reserved.
  4. ;    Unauthorized reproduction prohibited.
  5. ;
  6.  
  7. ;+
  8. ; NAME:
  9. ;    DEMO_MODE
  10. ;
  11. ; PURPOSE:
  12. ;    Returns true if IDL is in Demo Mode.
  13. ;
  14. ; CALLING SEQUENCE:
  15. ;    Result = DEMO_MODE()
  16. ;
  17. ; OUTPUTS:
  18. ;    Returns 1 if IDL is in Demo Mode and 0 otherwise.
  19. ;
  20. ; SIDE EFFECTS:
  21. ;    Does a FLUSH, -1.
  22. ;
  23. ; PROCEDURE:
  24. ;    Do a FLUSH, -1 and trap the error message.
  25. ;
  26. ; MODIFICATION HISTORY:
  27. ;    Written by SMR, Research Systems, Inc.    Feb. 1991
  28. ;    KDB Oct,1993: The error string had an extra ' ' in it and 
  29. ;              the function would always return 0. 
  30. ;-
  31.  
  32. FUNCTION DEMO_MODE
  33.  
  34. !err=0
  35. FLUSH, -1
  36. return, ((!err ne 0) and $
  37.     (!ERR_STRING EQ 'FLUSH: Feature disabled for demo mode.'))
  38.  
  39. END
  40.